import Types from '../actionTypes';

let initState = {
  jurisdictionList: [],
  jurisdictionPageSize: 1
};

export default (state = initState, action) => {
  const newState = JSON.parse(JSON.stringify(state));
  switch (action.type) {

    case Types.GET_JURISDICTION_LIST:
      newState.jurisdictionList = action.res.data;
      newState.jurisdictionPageSize = action.res.pageCount;
      return newState;

    default:
      console.log('Types no match in jurisdictionList.js ....');
  }
  return state;
}
